#include <iostream>

using std::cout;
using std::endl;

void display(void)
{
    cout << "display()" << endl;
}

void print()
{
    cout << "print()" << endl;
}


int main()
{
    //atexit注册的函数都会被一一执行，遵循栈的方式进行调用
    atexit(display);
    atexit(display);
    atexit(print);

    cout << "exit main()" << endl;
    return 0;
}

